home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1993-05-30 | 42.7 KB | 1,329 lines
card_2956.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" > <card> <id>2956</id> <filler1>0</filler1> <cantDelete> <false /> </cantDelete> <showPict> <true /> </showPict> <dontSearch> <false /> </dontSearch> <owner>2628</owner> <link rel="stylesheet" type="text/css" href="stylesheet_3192.css" /> <content> <layer>background</layer> <id>1</id> <text>This stack demonstrates the use of a set of externals for accessing functions of the Script Manager. These functions let you transparently take account of the idiosyncrasies of character sets used by different languages, and even different writing systems.Check out the “Demo” menu to see the various demonstrations.Note: the behaviour of these externals will normally be affected by the current font setting in the card window.This stack and the externals were written by Lawrence D’Oliveiro, Computer Services Dept, University of Waikato, Hamilton, New Zealand. You can reach me via e-mail on the Internet at ldo@waikato.ac.nz.</text> </content> <name>About</name> <script></script> </card> card_4216.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" > <card> <id>4216</id> <filler1>0</filler1> <bitmap>BMAP_5836.pbm</bitmap> <cantDelete> <false /> </cantDelete> <showPict> <true /> </showPict> <dontSearch> <false /> </dontSearch> <owner>4030</owner> <link rel="stylesheet" type="text/css" href="stylesheet_3192.css" /> <part> <id>1</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>95</left> <top>71</top> <right>319</right> <bottom>102</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Date</name> <script>On CloseFieldParseDateEnd CloseField</script> </part> <part> <id>2</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>34</left> <top>73</top> <right>86</right> <bottom>88</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>3</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>95</left> <top>112</top> <right>319</right> <bottom>143</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Time</name> <script>On CloseFieldParseTimeEnd CloseField</script> </part> <part> <id>4</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>34</left> <top>113</top> <right>86</right> <bottom>128</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>5</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>55</left> <top>167</top> <right>113</right> <bottom>192</bottom> </rect> <style>roundrect</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <true /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>Add</name> <script>On MouseUpAddToDateEnd MouseUp</script> </part> <part> <id>6</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>121</left> <top>172</top> <right>242</right> <bottom>188</bottom> </rect> <style>rectangle</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Delta Days</name> <script>On CloseFieldParseTimeEnd CloseField</script> </part> <part> <id>7</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>249</left> <top>173</top> <right>301</right> <bottom>188</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>8</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>96</left> <top>220</top> <right>163</right> <bottom>240</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>GMT</name> <script>On MouseUpOffsetGMTEnd MouseUp</script> </part> <part> <id>9</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>188</left> <top>220</top> <right>255</right> <bottom>240</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <true /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>Local</name> <script>On MouseUpOffsetGMTEnd MouseUp</script> </part> <content> <layer>background</layer> <id>1</id> <text>Date/Time Conversions</text> </content> <content> <layer>card</layer> <id>2</id> <text>Date:</text> </content> <content> <layer>card</layer> <id>4</id> <text>Time:</text> </content> <content> <layer>card</layer> <id>1</id> <text>Sunday, 30 May 1993</text> </content> <content> <layer>card</layer> <id>3</id> <text>2:01:42 PM</text> </content> <content> <layer>card</layer> <id>7</id> <text>Days</text> </content> <content> <layer>card</layer> <id>6</id> <text>100000</text> </content> <name>Dates</name> <script>On FormatDateGlobal TheLongDateRecGet LongDate2Secs(TheLongDateRec)Put IULDateString(it, 1) into card field "Date"Put IULTimeString(it, true) into card field "Time"End FormatDateOn ParseDateGlobal TheDateCache, TheLongDateRecGet String2Date(card field "Date", TheDateCache, TheLongDateRec)Put line 1 of it into TheLongDateRecPut line 3 of it into TheDateCacheIf line 2 of it < the length of card field "Date" thenAnswer "Not all characters of date used."End IfFormatDateEnd ParseDateOn ParseTimeGlobal TheDateCache, TheLongDateRecGet String2Time(card field "Time", TheDateCache, TheLongDateRec)Put line 1 of it into TheLongDateRecPut line 3 of it into TheDateCacheIf line 2 of it < the length of card field "Time" thenAnswer "Not all characters of time used."End IfFormatDateEnd ParseTimeOn AddSeconds NrSeconds-- offsets the displayed date/time by the specified amount.Global TheLongDateRecPut LongSecs2Date(LongDate2Secs(TheLongDateRec) + NrSeconds) ¬into TheLongDateRecFormatDateEnd AddSecondsOn AddToDateAddSeconds Round(card field "Delta Days" * 86400)End AddToDateOn OffsetGMT-- common MouseUp handler for GMT/Local radio buttons.Put "8,9" into ButtonIDsPut "-1,1" into FactorListRepeat with i = 1 to the number of items in ButtonIDsGet item i of ButtonIDsIf the short id of the target = it thenIf the hilite of card button id it thenPut 0 into TheFactor -- already selected -- don’t change date/timeElseSet hilite of card button id it to truePut item i of FactorList into TheFactorEnd IfElseSet hilite of card button id it to falseEnd IfEnd RepeatAddSeconds TheFactor * line 4 of ReadLocation()End OffsetGMT---- Top-level handlers--On OpenCardGlobal TheDateCache, TheLongDateRecPut InitDateCache() into TheDateCachePut LongSecs2Date(the seconds) into TheLongDateRecFormatDateEnd OpenCard</script> </card> card_4709.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" > <card> <id>4709</id> <filler1>0</filler1> <bitmap>BMAP_5590.pbm</bitmap> <cantDelete> <false /> </cantDelete> <showPict> <true /> </showPict> <dontSearch> <false /> </dontSearch> <owner>4030</owner> <link rel="stylesheet" type="text/css" href="stylesheet_3192.css" /> <part> <id>1</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>95</left> <top>71</top> <right>319</right> <bottom>102</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Text Format</name> <script>On CloseFieldConvertFormatEnd CloseField</script> </part> <part> <id>2</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>84</left> <top>108</top> <right>347</right> <bottom>157</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Binary Format</name> <script></script> </part> <part> <id>3</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>34</left> <top>73</top> <right>86</right> <bottom>88</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>4</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>95</left> <top>115</top> <right>319</right> <bottom>146</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Text A</name> <script>On CloseFieldParseNumber "A"PerformOpEnd CloseField</script> </part> <part> <id>5</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>95</left> <top>163</top> <right>319</right> <bottom>194</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Text B</name> <script>On CloseFieldParseNumber "B"PerformOpEnd CloseField</script> </part> <part> <id>6</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>94</left> <top>234</top> <right>318</right> <bottom>265</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Text Result</name> <script></script> </part> <part> <id>7</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>85</left> <top>130</top> <right>348</right> <bottom>179</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Binary A</name> <script></script> </part> <part> <id>8</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>85</left> <top>160</top> <right>348</right> <bottom>209</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Binary B</name> <script></script> </part> <part> <id>9</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>84</left> <top>186</top> <right>347</right> <bottom>235</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Binary Result</name> <script></script> </part> <part> <id>10</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>107</left> <top>203</top> <right>137</right> <bottom>220</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <true /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>+</name> <script>On MouseUpSetOpEnd MouseUp</script> </part> <part> <id>11</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>162</left> <top>204</top> <right>192</right> <bottom>221</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>-</name> <script>On MouseUpSetOpEnd MouseUp</script> </part> <part> <id>12</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>222</left> <top>204</top> <right>252</right> <bottom>221</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>*</name> <script>On MouseUpSetOpEnd MouseUp</script> </part> <part> <id>13</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>282</left> <top>204</top> <right>312</right> <bottom>221</bottom> </rect> <style>radiobutton</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>/</name> <script>On MouseUpSetOpEnd MouseUp</script> </part> <part> <id>14</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>243</left> <top>207</top> <right>357</right> <bottom>232</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Op</name> <script></script> </part> <part> <id>15</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>16</left> <top>116</top> <right>86</right> <bottom>130</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>16</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>15</left> <top>165</top> <right>84</right> <bottom>179</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>17</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>38</left> <top>234</top> <right>83</right> <bottom>249</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>18</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>57</left> <top>152</top> <right>320</right> <bottom>201</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Preset Format Names</name> <script></script> </part> <part> <id>19</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>56</left> <top>130</top> <right>319</right> <bottom>179</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Preset Formats</name> <script></script> </part> <part> <id>20</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>15</left> <top>201</top> <right>84</right> <bottom>215</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <content> <layer>background</layer> <id>1</id> <text>Number Parsing/Formatting</text> </content> <content> <layer>card</layer> <id>3</id> <text>Format:</text> </content> <content> <layer>card</layer> <id>4</id> <text>2.0</text> </content> <content> <layer>card</layer> <id>5</id> <text>2.0</text> </content> <content> <layer>card</layer> <id>7</id> <text>2</text> </content> <content> <layer>card</layer> <id>9</id> <text>4</text> </content> <content> <layer>card</layer> <id>8</id> <text>2</text> </content> <content> <layer>card</layer> <id>15</id> <text>Operand A:</text> </content> <content> <layer>card</layer> <id>16</id> <text>Operand B:</text> </content> <content> <layer>card</layer> <id>17</id> <text>Result:</text> </content> <content> <layer>card</layer> <id>6</id> <text>4.0</text> </content> <content> <layer>card</layer> <id>19</id> <text>3A000004000B000F000F0007000E000300030001000200020000110011000100000842AC00044E5E205F588F0E0505060E0505090505060E05050669537472696E6700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C3F000002000B00140014000A0013000100010001000400040000130013000100000842AC00044E5E205F588F13060E060606060F0606060E060606060F0606066E6700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C3E000005000C001300130008000F000300030000000200020000110011000100000842AC00044E5E205F588F12080606060E0606090606060E06067A65726F696E6700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C40000004000C0012001500090011000300030001000200020002110011001100000842AC00044E5E205F588F140505050E060643520505050E06064442060E06066700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C3E000004000B001000130007000F000300030001000200020002110011001100000842AC00044E5E205F588F120505050E0606280505050E060629060E0606696E6700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C</text> </content> <content> <layer>card</layer> <id>18</id> <text>Fixed pointFloating pointLeading zeroesMoney1Money2</text> </content> <content> <layer>card</layer> <id>2</id> <text>3A000004000B000F000F0007000E000300030001000200020000110011000100000842AC00044E5E205F588F0E0505060E0505090505060E05050669537472696E6700004E56FFFE1D7C0001FFFE1D6E000CFFFF2F2E000E49EEFFFE2F0C2F2E00084EBAFD2C4E5E205F4FEF000A4ED080154E6577436861725365704D756C7469537472696E670000004E5600002F2E000C1F3C000D2F2E00084EBAFFA84E5E205F508F4ED080124E65774D756C74694C696E65537472696E6700004E56FFFE422EFFFE286E000A342E00083814B8426D00003242A72F2E000A286E000A342E0008534245BC000FE54249EC0002287420002F144EBA01744A9F670000081D7C</text> </content> <content> <layer>card</layer> <id>1</id> <text>##0.##;-##0.##;0</text> </content> <content> <layer>card</layer> <id>20</id> <text>Operation:</text> </content> <content> <layer>card</layer> <id>14</id> <text>+</text> </content> <name>Numbers</name> <script>On ParseNumber FieldName-- converts a number from user-specified format to-- HyperTalk format.Get FormatStr2X(card field ("Text" && FieldName), ¬card field "Binary Format")Put line 1 of it into card field ("Binary" && FieldName)FormatNumber FieldNameEnd ParseNumberOn FormatNumber FieldName-- converts a number from HyperTalk format to user-specified format.Put FormatX2Str(card field ("Binary" && FieldName), ¬card field "Binary Format") into card field ("Text" && FieldName)End FormatNumberOn ParseNumbersParseNumber "A"ParseNumber "B"ParseNumber "Result"End ParseNumbersOn FormatNumbersFormatNumber "A"FormatNumber "B"FormatNumber "Result"End FormatNumbersOn ConvertFormat-- converts a format string to system-internal,-- localization-independent format.Get Str2Format(card field "Text Format")Put line 1 of it into card field "Binary Format"Get line 2 of itIf it ≠ 0 thenAnswer "Something not quite right with format:" && itEnd IfFormatNumbersEnd ConvertFormatOn UnconvertFormat-- converts a format to a user-readable string. The-- symbols used in this string will depend on system-- localization.Put Format2Str(card field "Binary Format") into ¬card field "Text format"End UnconvertFormatOn PerformOp-- performs the specified operation on the values in-- the operand fields, and displays the result in-- the result field.Put the value of (card field "Binary A" && card field "Op" ¬&& card field "Binary B") into card field "Binary Result"FormatNumber "Result"End PerformOpOn SetOp-- common mouse-up handler for the operator selection-- radio buttons. Selects the specified operation and-- carries it out.Put "10,11,12,13" into ButtonIDsPut "+,-,*,/" into TheOpsPut empty into card field "Op"Repeat with i = 1 to the number of items in ButtonIDsGet item i of ButtonIDsIf the short id of the target = it thenPut item i of TheOps into card field "Op"Set hilite of button id it to trueElseSet hilite of button id it to falseEnd IfEnd RepeatPerformOpEnd SetOp---- Menu of preset formats--On SetFormat FormatIndex-- changes format to the specified preset and updates-- display accordingly.Put line FormatIndex of card field "Preset Formats" ¬into card field "Binary Format"UnconvertFormatFormatNumbersEnd SetFormatOn AddFormat FormatName, FormatString-- internal utility routine for constructing list of-- preset formats.Get Str2Format(FormatString)If line 2 of it ≠ 0 thenAnswer "Something not quite right with format:" && line 2 of it ¬with "Cancel"Exit AddFormatEnd IfPut line 1 of it & return ¬after card field "Preset Formats"Put FormatName & return after card field "Preset Format Names"End AddFormatOn CreateFormatMenuCreate menu "Formats"Repeat with i = 1 to the number of lines in card field "Preset Formats"Put line i of card field "Preset Format Names" ¬after menu "Formats" with MenuMsg "SetFormat" && iEnd RepeatEnd CreateFormatMenuOn DeleteFormatMenuIf there is a menu "Formats" thenDelete menu "Formats"End IfEnd DeleteFormatMenu---- Top-level handlers--On SuspendStackDeleteFormatMenuPass SuspendStackEnd SuspendStackOn ResumeStackSend the params to this backgroundCreateFormatMenuEnd ResumeStackOn OpenCardUnconvertFormatFormatNumbersCreateFormatMenuEnd OpenCardOn CloseCardDeleteFormatMenuEnd CloseCard</script> </card> card_5004.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" > <card> <id>5004</id> <filler1>0</filler1> <bitmap>BMAP_5209.pbm</bitmap> <cantDelete> <false /> </cantDelete> <showPict> <true /> </showPict> <dontSearch> <false /> </dontSearch> <owner>4030</owner> <link rel="stylesheet" type="text/css" href="stylesheet_3192.css" /> <part> <id>1</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>79</left> <top>71</top> <right>342</right> <bottom>120</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Input</name> <script>On CloseFieldDoConvertEnd CloseField</script> </part> <part> <id>2</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>79</left> <top>131</top> <right>341</right> <bottom>181</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>plain</textStyle> <textHeight>16</textHeight> <name>Output</name> <script></script> </part> <part> <id>3</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>22</left> <top>72</top> <right>74</right> <bottom>87</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>4</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <false /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>21</left> <top>133</top> <right>73</right> <bottom>148</bottom> </rect> <style>opaque</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>right</textAlign> <font>Helvetica</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>5</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>44</left> <top>205</top> <right>178</right> <bottom>228</bottom> </rect> <style>checkbox</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>Uppercase</name> <script>On MouseUpFlipHiliteDoConvertEnd MouseUp</script> </part> <part> <id>6</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>198</left> <top>205</top> <right>334</right> <bottom>228</bottom> </rect> <style>checkbox</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <false /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>Strip Diacritics</name> <script>On MouseUpFlipHiliteDoConvertEnd MouseUp</script> </part> <content> <layer>background</layer> <id>1</id> <text>String Conversion</text> </content> <content> <layer>card</layer> <id>3</id> <text>Input:</text> </content> <content> <layer>card</layer> <id>4</id> <text>Output:</text> </content> <content> <layer>card</layer> <id>1</id> <text>Sample Text.</text> </content> <content> <layer>card</layer> <id>2</id> <text>sample text.</text> </content> <name>Strings</name> <script>On FlipHiliteSet hilite of the target to not the hilite of the targetEnd FlipHiliteOn DoConvertPut LowerText(card field "Input", the hilite of card button id 5, ¬the hilite of card button id 6) into card field "Output"End DoConvert</script> </card>